<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSDN页面</title>
    <!-- 静态包含base标签 -->
    <%@include file="/pages/common/head.jsp"%>

    <link rel="stylesheet" href="static/css/base.css">
    <link rel="stylesheet" href="static/css/common1.css">
    <link rel="stylesheet" href="static/css/index.css">

        <script type="text/javascript">
            $(function (){



            });

        </script>


</head>

<body>
    <!-- 头部制作start -->
    <header class="header">
        <!-- 头部左侧 -->
        <div class="toolbar-left">
            <div class="header-logo">
                <a href="#"><img src="images/header-logo.png" alt=""></a>
            </div>
<%--            <ul class="toolbar">--%>
<%--                <li><a href="#">播客</a></li>--%>
<%--                <li><a href="#">课程</a></li>--%>
<%--                <li><a href="#">文库·商城</a></li>--%>
<%--                <li><a href="#">问答</a></li>--%>
<%--                <li><a href="#">社区</a></li>--%>
<%--                <li><a href="#">插件</a></li>--%>
<%--                <li><a href="#">认证</a></li>--%>
<%--                <li><a href="#">开源</a></li>--%>

<%--            </ul>--%>
        </div>
        <!-- 头部左侧end -->


        <!-- 搜索栏制作 -->
        <div class="search">
            <form action="searchServlet" method="get">
                <input type="hidden" name="action" value="searchUserAndBlog"/>
            <input type="text" name="searchValue" placeholder="数据结构与算法">
            <button type="submit" class="search-btn">
                <i></i><span>搜索</span>
            </button>
            </form>
        </div>
        <!-- 搜索栏制作end -->
        <!-- 头部右侧 -->
        <div class="header-right">

            <ul>
                <li class="create">
                    <a href="#"><i class="feather"></i>创作<i class="create-right"></i></a>
                </li>

                <c:if test="${empty sessionScope.user}">

                    <li><a href="pages/user/login.jsp">登录
                    </a></li>
                    <li><a href="pages/user/regist.jsp">
                        注册</a></li>

                    <%--如果用已经登录，则显示登录成功之后的用户信息--%>
                </c:if>
                <c:if test="${not empty sessionScope.user}">
                    <span>欢迎<span style="color: red" class="um_span">${sessionScope.user.username}</span>光临</span>
<%--                    blogServlet?action=queryBlog&username=${sessionScope.user.username}--%>
                    <a href="blogServlet?action=page&username=${sessionScope.user.username}">我的个人主页</a>
                    <a href="userServlet?action=logout">注销</a>&nbsp;
                    <li><a href="#">收藏</a></li>
                </c:if>

<%--                <li class="gift"><a href="#">会员中心</a>--%>
                </li>

<%--                <li><a href="#">动态</a></li>--%>

            </ul>
        </div>


    </header>
    <!-- 头部制作end -->
    <!-- 导航栏制作 -->
    <nav class="nav">
        <ul>
            <li><a href="searchServlet?action=searchUserAndBlog&searchValue=人工智能">人工智能</a></li>
            <li><a href="searchServlet?action=searchUserAndBlog&searchValue=前端">前端</a></li>
            <li><a href="searchServlet?action=searchUserAndBlog&searchValue=架构">架构</a></li>
            <li><a href="searchServlet?action=searchUserAndBlog&searchValue=区块链">区块链</a></li>
            <li><a href="searchServlet?action=searchUserAndBlog&searchValue=数据库">数据库</a></li>
            <li><a href="searchServlet?action=searchUserAndBlog&searchValue=5G">5G</a></li>
            <li><a href="searchServlet?action=searchUserAndBlog&searchValue=游戏开发">游戏开发</a></li>
            <li><a href="searchServlet?action=searchUserAndBlog&searchValue=大数据">大数据</a></li>
            <li><a href="pages/qrcode/b.jsp">二维码</a></li>

        </ul>

    </nav>

</body>

</html>